package bar.dark.lee.common;

import android.os.Parcel;
import android.os.Parcelable;

public class KeyValueData implements Parcelable
{
	private String key;
	private String value;
	
	public KeyValueData(){};
	
	public KeyValueData(Parcel source)
	{
		this.key = source.readString();
		this.value = source.readString();
	}
	
	@Override
	public int describeContents()
	{
		return 0;
	}
	@Override
	public void writeToParcel(Parcel dest, int flags)
	{
		dest.writeString(this.getKey());
		dest.writeString(this.getValue());
	}
	
	public static Parcelable.Creator<KeyValueData> CREATOR = new Creator<KeyValueData>()
	{
		@Override
		public KeyValueData[] newArray(int size)
		{
			return new KeyValueData[size];
		}
		
		@Override
		public KeyValueData createFromParcel(Parcel source)
		{
			return new KeyValueData(source);
		}
	};
	
	public String getKey()
	{
		return key;
	}
	public void setKey(String key)
	{
		this.key = key;
	}
	public String getValue()
	{
		return value;
	}
	public void setValue(String value)
	{
		this.value = value;
	}
}
